package com.fish.start.animation.threads;

import java.util.concurrent.Callable;

import com.fish.start.animation.Attr.AbstractWay;

public class CallableThread implements Callable<Boolean>{
	private AbstractWay maw;
	private int mtype ;
	public CallableThread(AbstractWay aw,int type){
		maw = aw;
		mtype = type;
	}
	@Override
	public Boolean call() throws Exception {
		switch (mtype) {
		case AbstractWay.ALPHA_TYPE:
			return maw.alpha();
		case AbstractWay.DISPLACE_TYPE:
			return maw.displacement();
		case AbstractWay.ROTATE_TYPE:
			return maw.rotate();
		case AbstractWay.SCALE_TYPE:
			return maw.scale();
		default:
			return true;
	}
	}

}
